package com.pureut.scheduling.mapper;

import com.pureut.scheduling.domain.CalendarLine;
import com.pureut.scheduling.domain.CalendarRest;
import com.pureut.scheduling.domain.CalendarTeam;
import com.pureut.scheduling.domain.SchedulingCalendar;
import com.pureut.scheduling.domain.dto.*;
import com.pureut.scheduling.domain.vo.CalendarSpecialVo;
import com.pureut.scheduling.domain.vo.HolidayVo;
import com.pureut.scheduling.domain.vo.SchedulingCalendarVo;

import java.util.Date;
import java.util.List;

/**
 * @Description
 * @Param
 * @Date
 * @Author hl
 **/
public interface SchedulingCalendarMapper {

    /**
     * 查询工厂日历
     */
    List<SchedulingCalendarDto> selectCalendarList(SchedulingCalendarVo schedulingCalendarVo);


    /**
     * 新增工厂日历
     */
    int insertSchedulingCalendar(SchedulingCalendar schedulingCalendar);

    /**
     * 新增工厂日历(班别信息)
     */
    int insertCalendarTeam(List<CalendarTeam> list);

    /**
     * 新增工厂日历(休息时间)
     */
    int insertCalendarRest(List<CalendarRest> list2);

    /**
     * 新增工厂日历(线别信息)
     */
    int insertCalendarLine(List<CalendarLine> list3);

    /**
     * 批量删除工厂日历
     */
    int deleteCalendarById(String[] calendarIdS);

    /**
     * 删除工厂日历(班别信息)
     */
    int deleteCalendarTeamById(long calendarId);

    /**
     * 删除工厂日历(休息)
     */
    int deleteCalendarRestById(long calendarId);

    /**
     * 删除工厂日历(线别)
     */
    int deleteCalendarLineById(long calendarId);

    /**
     * 修改工厂日历
     */
    int updateCalendarEdit(SchedulingCalendar schedulingCalendar);

    /**
     * 查看工厂日历(班别信息)
     */
    List<CalendarTeam> selectCalendarTeamList(long calendarId);


    /**
     * 新增特殊日历
     */
    int insertCalendarSpecia(CalendarSpecialVo calendarSpecialVo);


    /**
     * 查看特殊日历
     */
    List<CalendarSpecialDto> selectCalendarSpecialList(CalendarSpecialVo calendarSpecialVo);

    /**
     * 批量删除特殊日历
     */
    int deleteCalendarSpecialById(String[] calendarIdS);

    /**
     * 修改特殊日历
     */
    int updateCalendarSpecialEdit(CalendarSpecialVo calendarSpecialVo);

    /**
     * 查看工厂日历(休息时间)
     */
    List<CalendarRest> selectCalendarRestList(long calendarId);

    /**
     * 查看工厂日历(线别)
     */
    List<CalendarLine> selectCalendarLineList(long calendarId);

    /**
     * 根据线别id查询对应的日历内容
     */
    Long selectCalendarLineOnById(long lineId);

    HolidayVo selectCalendarSchedule(Date parse);

    String maxCalendarScheduleMsg(String msg);

    CalendarTeam selectCalendarBan(String teamId,long calendarId);

    int selectCalendarScheduleOnById(String format);

    /**
     * 班组管理工厂日历下拉
     * @param calendarSpecialVo
     * @return
     */
    List<ShopCalendarDto> selectShopCalendarList(CalendarSpecialVo calendarSpecialVo);

    /**
     * 根据工厂日历id查询班次
     * @param calendarId
     * @return 下拉菜单
     */
    List<ShiftCalendarDto> selectShiftCalendarDto(Long calendarId);

    /**
     * 根据工厂日历id查询线别
     * @param calendarId
     * @return
     */
    List<LineTypeCalendarDto> selectLineTypeCalendarList(Long calendarId);

    /**
     * 根据工厂日历id班别设置
     * @param calendarId
     * @return
     */
    List<ShiftSettingDto> selectShiftSettingList(Long calendarId);

    SchedulingCalendar selectCalendarLineWeekend(long lineId);

    List<String> selectScheduleCount(Date startTime, Date endTime,int status);

    /**
     * 根据线别编码查询班次信息
     * @param lineCode
     * @return
     */
    List<ShiftSettingDto> selectShiftLine(String lineCode);

    /**
     * 根据线别id查询线边编码
     * @param lineId
     * @return
     */
    String selectCalendarLineCode(long lineId);

    int countSchedulingCalendar(String calendarCode);

    SchedulingCalendar selectGetCalendarById(long caId);

    int countCheckCalendarLine(String shopId);

    long numCalendarLine(long cal);

    int countCalendarLineOnById(long lineId);
}
